<template>
  <div class="renderQuestion" ref="renderQuestion">
    <!-- 在这里渲染试题 -->
    {{itemData.content}}
  </div>
</template>

<script>
/* eslint-disable */
// import entering from "./components/entering.demo.js";


export default {
  props: ['itemData'],
  data() {
    return {
    };
  },
  mounted() {
    // const renderQuestion = this.$refs.renderQuestion
    // const question = JSON.parse(this.data.content)
    // entering.render_problem(renderQuestion, question)
    // console.log(this.itemData)
    // if (this.itemData.type === 'question') {
    //   const renderQuestion = this.$refs.renderQuestion
    //   const question = JSON.parse(this.itemData.content)
    //   console.log('question', question)
    //   entering.render_problem(renderQuestion, question)
    // }
    console.log(this.$refs.renderQuestion.offsetHeight)
    this.$emit('renderComplete', {id: this.itemData.id, height: this.$refs.renderQuestion.offsetHeight})
  },
  computed: {
  },
  components: {}
};
</script>

<style lang="css">
.renderQuestion {
  width: 600px;
  word-break: break-all;
}
</style>